import React, { useEffect } from 'react';
import { Modal, Form, Input, Select } from 'root/baseui';
const { Option } = Select;
function FormModal({ onOk, onCancel, value }) {
  const [form] = Form.useForm();

  useEffect(() => {}, [value]);

  async function onOkAsync() {
    try {
      onOk();
    } catch (error) {}
  }

  return (
    <Modal show width='80%' height='80%' onOk={onOkAsync} onCancel={onCancel}>
      <Form form={form}>
        <Form.Item label='名称' name='name'>
          <Input placeholder='请输入' />
        </Form.Item>
        <Form.Item label='类型' name='type'>
          <Select placeholder='请选择'>
            <Option value={0}>默认</Option>
          </Select>
        </Form.Item>
      </Form>
    </Modal>
  );
}

export default FormModal;
